<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <!-- 引入vue.js文件 -->
    <!-- from https://unpkg.com/vue@2.7.16/dist/vue.js -->
    <script src="js/vue.js"></script>
</head>

<body>

    <div id="app">
        <a v-bind:href="url">Link 1</a>
        <!-- 简化写法 -->
        <a :href="url">Link 2</a>
        
        <!-- 通过输入动态改变a标签的链接 -->
        <input type="text" v-model="url">
    </div>

</body>
<script>
    // 定义Vue对象
    new Vue(
        {
            el: "#app",  // Vue接管的区域
            data: {
                url: "https://www.baidu.com"
            }
        }
    )
</script>

</html>